import About from "../pages/About"
import Home from "../pages/Home";
import Message from "../pages/Message";
import MessageDetail from "../pages/MessageDetail";
import News from "../pages/News";

const routes = [
  {
    path: "/",
    element: <About />,
  },
  {
    path: "/about",
    element: <About />,
  },
  {
    path: "/home",
    element: <Home />,
    children: [
    {    
      path: "news",
      element: <News />,
    },
    {    
      path: "message",
      element: <Message />,
      children: [
        {
          // path: "detail/:id/:title/:content", // params参数
          path: "detail", // search/state参数, 无需声明接收
          element: <MessageDetail />
        }
      ]
    }
    ]
  },
]

export default routes